home *** CD-ROM | disk | FTP | other *** search
/ Hackers Magazine 57 / CdHackersMagazineNr57.iso / Software / Programming / nsis-2.46-setup.exe / Contrib / Modern UI 2 / MUI2.nsh < prev    next >
Encoding:
Text File  |  2009-02-01  |  2.2 KB  |  123 lines

  1. /*
  2.  
  3. NSIS Modern User Interface - Version 2.0
  4. Copyright 2002-2009 Joost Verburg
  5.  
  6. */
  7.  
  8. !echo "NSIS Modern User Interface version 2.0 - Copyright 2002-2009 Joost Verburg"
  9.  
  10. ;--------------------------------
  11.  
  12. !ifndef MUI_INCLUDED
  13. !define MUI_INCLUDED
  14.  
  15. !define MUI_SYSVERSION "2.0"
  16.  
  17. !verbose push
  18.  
  19. !ifndef MUI_VERBOSE
  20.   !define MUI_VERBOSE 3
  21. !endif
  22.  
  23. !verbose ${MUI_VERBOSE}
  24.  
  25. !addincludedir "${NSISDIR}\Contrib\Modern UI 2"
  26.  
  27. ;--------------------------------
  28. ;Header files required by MUI
  29.  
  30. !include WinMessages.nsh
  31. !include LogicLib.nsh
  32. !include nsDialogs.nsh
  33. !include LangFile.nsh
  34.  
  35.  
  36. ;--------------------------------
  37. ;Macros for compile-time defines
  38.  
  39. !macro MUI_DEFAULT SYMBOL CONTENT
  40.  
  41.   ;Define symbol if not yet defined
  42.   ;For setting default values
  43.  
  44.   !ifndef "${SYMBOL}"
  45.     !define "${SYMBOL}" "${CONTENT}"
  46.   !endif
  47.  
  48. !macroend
  49.  
  50. !macro MUI_SET SYMBOL CONTENT
  51.  
  52.   ;Define symbol and undefine if neccesary
  53.   
  54.   !insertmacro MUI_UNSET "${SYMBOL}"
  55.   !define "${SYMBOL}" "${CONTENT}"
  56.  
  57. !macroend
  58.  
  59. !macro MUI_UNSET SYMBOL
  60.  
  61.   ;Undefine symbol if defined
  62.  
  63.   !ifdef "${SYMBOL}"
  64.     !undef "${SYMBOL}"
  65.   !endif
  66.  
  67. !macroend
  68.  
  69.  
  70. ;--------------------------------
  71. ;MUI interface
  72.  
  73. !include "Deprecated.nsh"
  74. !include "Interface.nsh"
  75. !include "Localization.nsh"
  76. !include "Pages.nsh"
  77.  
  78.  
  79. ;--------------------------------
  80. ;Pages
  81.  
  82. !include "Pages\Components.nsh"
  83. !include "Pages\Directory.nsh"
  84. !include "Pages\Finish.nsh"
  85. !include "Pages\InstallFiles.nsh"
  86. !include "Pages\License.nsh"
  87. !include "Pages\StartMenu.nsh"
  88. !include "Pages\UninstallConfirm.nsh"
  89. !include "Pages\Welcome.nsh"
  90.  
  91.  
  92. ;--------------------------------
  93. ;Insert MUI code in script
  94.  
  95. !macro MUI_INSERT
  96.  
  97.   !ifndef MUI_INSERT
  98.     !define MUI_INSERT
  99.  
  100.     ;This macro is included when the first language file is included,
  101.     ;after the pages.
  102.  
  103.     ;Interface settings
  104.     !insertmacro MUI_INTERFACE
  105.  
  106.     ;Interface functions - Installer
  107.     !insertmacro MUI_FUNCTION_GUIINIT
  108.     !insertmacro MUI_FUNCTION_ABORTWARNING
  109.  
  110.     ;Interface functions - Uninstaller
  111.     !ifdef MUI_UNINSTALLER
  112.       !insertmacro MUI_UNFUNCTION_GUIINIT
  113.       !insertmacro MUI_FUNCTION_UNABORTWARNING
  114.     !endif
  115.  
  116.   !endif
  117.  
  118. !macroend
  119.  
  120. !endif
  121.  
  122. !verbose pop
  123.